Prizm Content Connect
Sample Code

Sample code is included to demonstrate how integration can work. Steps for how to run the sample code are included after the code tables below.

 

ASP.NET Code Files

File

Description

App_Code folder

Contains the supporting classes for configuration and path manipulation.

PCC folder

Contains the supporting classes to handle client requests and Prizm Proxy Service responses.

Default.aspx

Starting Point. Calls ViewerEnterprise.swf and passes Sample.doc filename. Also contains the conversion logic and calls to Prizm Proxy Service convert2swf and initiates conversion.

Diagnostics.aspx

Prizm environment diagnostics file.

Error.aspx

Error handler.

favicon.ico

Bookmark icon file.

prizmconfig.xml

Contains the settings of installation, temporary paths, and Prizm Proxy Service settings.

Project.sln

Microsoft Visual Studio Solution File.

Sample.doc

Document to be converted.

settingsenterprise.xml

Contains the location of conversion helper files.

swfobject.2.2.js

SWF Objects Javascript Library.

ViewerEnterprise.swf

Prizm viewer file.

Web.config

Web configuration file.

 

PHP Code Files

File

Description

config.php

Configuration setting file.

error.php

Error handler.

favicon.ico

Bookmark icon file.

getdocument.php

Converter result document handler.

getfastpagecount.php

Get Fast page count file.

gettotalpagecount.php

Get Total page count file.

index.php

Starting Point. Calls ViewerEnterprise.swf and passes Sample.doc filename. Also contains the conversion logic and calls to Prizm Proxy Service convert2swf and initiates conversion.

license.php

Licensing handler.

listmarkup.php

List markup handler.

openmarkup.php

Open markup handler.

prizmconfig.xml

Contains the settings of installation, temporary paths, and Prizm Proxy Service settings.

Sample.doc

Document to be converted.

sample_config.php

Sample configuration for prizmconfig.xml handler.

savedocument.php

Save document handler.

savemarkup.php

Save markup handler.

settingsenterprise.xml

Contains the location of conversion helper files.

swfobject.2.2.js

SWF Objects Javascript Library.

ViewerEnterprise.swf

Prizm viewer file.

 

How to Run the Sample Code in IIS

  1. Create a Virtual Directory or new site on IIS or Web Server and point to <prizm-install>\Samples\Plus\.net cs\ or <prizm-install>\Samples\Plus\.net vb\.
  2. Make sure you give Read and Execute permissions in the site to all files.
  3. Browse to default.asp file like this:
    http://server:port/default.aspx?document=Sample.doc
    where Sample.doc is a document in <prizm-install>\Samples\Plus\.net cs\ or <prizm-install>\Samples\Plus\.net vb\.

 

How to Run the Sample Code in Apache HTTP Server

  1. Create a Virtual Directory or new site on Apache HTTP Server and point to <prizm-install>\Samples\Plus\php\
  2. Make sure you give Read and Execute permissions in the site to all files.
  3. Browse to index.php file like this:
    http://server:port/index.php?document=Sample.doc  
    where Sample.doc is a document in <prizm-install>\Samples\Plus\php\.

 

How to Run the Sample Code in Apache on Linux

  1. Copy or link the apache directory under your apache root directory. For example:

Debian/Ubuntu:
# cp -R /usr/share/prizm/Samples/html5/php  /var/www/prizm_html5

Red Hat/CentOS:
# cp -R /usr/share/prizm/Samples/html5/php  /var/www/html/prizm_html5

  1. Allow read and write permissions for both Prizm service and Apache server to the temp and markups directories in the sample. The following assume default configuration of Apache and that Prizm service is running as root.

Debian/Ubuntu:
# sudo chmod 775 /var/www/prizm_html5/temp /var/www/prizm_html5/markups
# sudo chgrp www-data /var/www/prizm_html5/temp /var/www/prizm_html5/markups

Red Hat/CentOS:
# chmod 775 /var/www/html/prizm_html5/temp /var/www/html/prizm_html5/markups
# chgrp apache /var/www/prizm_html5/temp /var/www/prizm_html5/markups

  1. Open the sample in a browser by opening http://<serveraddress>/prizm_html5/.

JSP Sample

How to Open the Sample in Eclipse IDE for Java EE Developers

  1. Select File\Import…
  2. Select Existing Projects into Workspace and click Next.
  3. Click Browse… and browse to <prizm-install>\Samples\Plus\ jsp\ and click OK.
  4. Confirm the prizmccplusjsp project is listed and checked and click Finish.

How to Open the Sample in JDeveloper

  1. Select File\Open…
  2. Browse to and open <prizm-install>\Samples\Plus\jsp\prizmccplusjsp.jws

How to Run the Sample Code in Tomcat

  1. Create C:\markups and C:\temp directories. Alternatively if on Linux create /markups/ and /temps. Make sure they have read/write permissions for the user the Tomcat server runs as.
  2. Place a document named sample.doc in C:\temp or /temp/
  3. Copy the prizmccplusjsp.war file from <prizm-install>\Samples\Plus\jsp\deploy\ to <tomcat-install>\webapps and restart Tomcat.
    1. Alternatively, you may use some other deployment tool/page to deploy the war file.
  4. Browse to http://<tom-catserver-address>/prizmccplusjsp/.

How to Run the Sample Code in Weblogic

  1. Browse the WebLogic console using http://localhost:7001/console.
  2. Go to base_domain/Deployments.
  3. Click Lock and Edit.
  4. Click Install.
  5. Click Upload your file(s).
  6. In Deployment Archive, select <prizm-install>\Samples\Plus\jsp\deploy\prizmccplusjsp.war.
  7. Click Next.
  8. Select prizmccplusjsp.war and click Next a few times and then click Finish.
  9. Click Activate Changes in the top left corner.
  10. Browse to http://<weblogic-server-address>/prizmccplusjsp/.

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback